import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Jiang Jinxi
 * Date: 2024-03-30
 * Time: 14:09
 */
public class test1 {
    public static int reverse(int number){
        String str = number+"";
        String str2 = "";
        for (int i = str.length()-1; i >= 0 ; i--) {
           char s = str.charAt(i);
           str2 = str2 + s;
        }
        return Integer.valueOf(str2);
    }
    public static boolean isPalindrome(int number){
        int number2 = reverse(number);
        if(number == number2){
            return true;
        }
        return false;
    }
    public static void main(String[] args) {
        System.out.print("请输入一个三位以下整数:");
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        if(isPalindrome(num)){
            System.out.println("是回文数");
        }else{
            System.out.println("不是回文数");

        }
    }
}
